package br.usp.ime.macmovel.android;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;

/**
 * Shows a map containing museums, restaurants and institutes.
 */
public class UspMapActivity extends Activity 
{
    /**
     * Directs the user to the custom map created for this app.
     */
    @Override
    public void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        Uri uri = Uri.parse("geo:0,0?q=" + getString(R.string.kml_address));
        Intent mapIntent = new Intent(Intent.ACTION_VIEW, uri);
        startActivity(mapIntent);
    }
    
    /**
     * Goes back to the main activity.
     */
    @Override
    protected void onResume() {
    	startActivity(new Intent(this, MainActivity.class));
    	super.onResume();
    }
}